package com.springboot.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author: lzh
 */
@Data
@Entity
@Table(name = "wx_user")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxUser implements Serializable{

    //用id
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    //用户openid
    @JsonIgnore
    @Column(name = "openid")
    private String openid;

    //用户姓名
    @Column(name = "name")
    private String name;

    //用户头像
    @Column(name = "avatar_url")
    private String avatarUrl;

    //用户性别
    @Column(name = "gender")
    private String gender;


    //用户身份证
    @Column(name = "id_card")
    private String idCard;

    //出入次数
    @Column(name = "access_num")
    private Integer accessNum;

    //房号
    @Column(name = "room_number")
    private String roomNumber;

    //是否为住户
    @Column(name = "is_regident")
    private Boolean isRegident;

    //是否为检查人员
    @Column(name = "is_prosecutor")
    private Boolean isProsecutor;

    //账号是否被锁定
    @Column(name = "is_lock")
    private Boolean isLock;

    //健康状态
    @Column(name = "status")
    private String status;

    //创建时间
    @Column(name = "create_time")
    @CreationTimestamp
    private Date createTime;

}
